from google.appengine.ext import ndb

class FacultyForSem(ndb.Model):
    semester = ndb.StringProperty(required = True)
    fac_name = ndb.StringProperty(required = True)
    fac_num =  ndb.StringProperty(required = True)
    courses = ndb.JsonProperty(required = True)
    
class SemesterData(ndb.Model):
    semester = ndb.StringProperty(required = True)
    courses_list = ndb.JsonProperty(required = True)
    faculties = ndb.JsonProperty(required = True)


class User(ndb.Expando):
    _default_indexed = False
    userId = ndb.StringProperty(required = True)
    userEmail = ndb.StringProperty(required = True)
    nickName = ndb.StringProperty(required = True)
    saved_data = ndb.JsonProperty(default = {})
    chosenCoursesLists = ndb.JsonProperty(default = {"2014":[[],[]]})
    events = ndb.JsonProperty(default = [[],[],[]])
    
class CoursesStats(ndb.Model):
    semester = ndb.StringProperty(required = True)
    stats = ndb.JsonProperty(default = {})
    
class OverallData(ndb.Model):
    facebook_to_google_map = ndb.JsonProperty(default = {})